home *** CD-ROM | disk | FTP | other *** search
/ Champak 141 / (Vol 141) Oct 17 2011.iso / Games / Clueless.swf / scripts / Forms / AchievementsPopupForm.as < prev    next >
Encoding:
Text File  |  2011-10-17  |  1.1 KB  |  45 lines

  1. package Forms
  2. {
  3.    import Common.SoundManager;
  4.    import caurina.transitions.Tweener;
  5.    import flash.text.TextField;
  6.    
  7.    [Embed(source="/_assets/assets.swf", symbol="Forms.AchievementsPopupForm")]
  8.    public class AchievementsPopupForm extends CluelessBaseForm
  9.    {
  10.        
  11.       
  12.       public var _medal:Medal;
  13.       
  14.       public var _tfAwardName:TextField;
  15.       
  16.       internal var _sName:String;
  17.       
  18.       public function AchievementsPopupForm()
  19.       {
  20.          super();
  21.       }
  22.       
  23.       public function init(param1:String) : void
  24.       {
  25.          _sName = param1;
  26.          _tfAwardName.text = _sName + " AWARD";
  27.          _medal.gotoAndStop(param1);
  28.          _medal.scaleX = 0.01;
  29.          _medal.scaleY = 0.01;
  30.          Tweener.addTween(_medal,{
  31.             "scaleX":1,
  32.             "scaleY":1,
  33.             "time":1,
  34.             "onComplete":onComplete
  35.          });
  36.          SoundManager.getInstance().playSound("NewTrophyAwardedSound");
  37.       }
  38.       
  39.       protected function onComplete() : void
  40.       {
  41.          setBackButton(this);
  42.       }
  43.    }
  44. }
  45.